package com.csesteel.crm.dao;

import com.csesteel.common.dao.BaseDao;
import com.csesteel.crm.domain.CrmPriviledge;

import java.util.List;

/**
 * Created by Administrator on 2015/5/20 0020.
 */
public interface CrmPriviledgeDao extends BaseDao<CrmPriviledge> {
    /**\
     * 分页查询所有权限
     * @param pageNo
     * @param pageSize
     * @return
     */
    public List<CrmPriviledge> findAllCrmPriviledgeByPage(int pageNo, int pageSize, String name);

    /**
     * 查询所有总数
     * @return
     */
    long findCountUsersWithParams(String name);

    /**
     * 保存权限对应的菜单资源
     * @param priviledgeId
     * @param menuId
     */
    public void savePriviledgeByMenu(Integer priviledgeId, Integer menuId);

    /**
     * 根据权限id删除关联的菜单
     * @param priviledgeId
     */
    public void deletePriviledgeByMenu(Integer priviledgeId);
}
